﻿/**********************************************************************
 * @file   GUIGlobalFrequencyDomainDialog.h
 * @brief  全局频谱范围界面声明
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-02-08
 *********************************************************************/
#ifndef _GUIGlobalFrequencyDomainDialog_H
#define _GUIGlobalFrequencyDomainDialog_H

#include "GUIPostDialogAPI.h"
#include "GUIWidget/GUIDialogBase.h"

namespace Core
{
    class FITKActionOperator;
}

namespace Ui {
class GUIGlobalFrequencyDomainDialog;
}

namespace Acoustics {
    class FITKGlobalFrequencyDomain;
}

namespace GUI
{
    /**
     * @brief  全局频谱范围窗口类
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-12-31
     */
    class GUIPostDialogAPI GUIGlobalFrequencyDomainDialog : public GUIDialogBase
    {
        Q_OBJECT
    public:
        /**
         * @brief  create object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-31
         */
        GUIGlobalFrequencyDomainDialog(Acoustics::FITKGlobalFrequencyDomain* globalFrequencyDomain, Core::FITKActionOperator* oper, QWidget *parent = nullptr);
        /**
         * @brief    Destroy object
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-31
         */
        virtual ~GUIGlobalFrequencyDomainDialog();
        /**
         * @brief    初始化
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-31
         */
        void init();

    protected slots:
        /**
         * @brief cencel button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief OK button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_OK_clicked();
        void on_lineEdit_textChanged(const QString &str);
        void on_comboBox_StartFreq_currentIndexChanged(int index);
        void on_comboBox_EndFreq_currentIndexChanged(int index);
        /**
         * @brief    on radioButton StandOct toggled
         * @param[i] checkState 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-08
         */
        void on_radioButton_StandOct_toggled(bool checkState);
        /**
         * @brief    on radioButton 13rdStandOct toggled
         * @param[i] checkState 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-08
         */
        void on_radioButton_13rdStandOct_toggled(bool checkState);
        /**
         * @brief    on radioButton Exact toggled
         * @param[i] checkState 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-08
         */
        void on_radioButton_Exact_toggled(bool checkState);
        /**
         * @brief    on radioButton Constant toggled
         * @param[i] checkState 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-08
         */
        void on_radioButton_Constant_toggled(bool checkState);


    private:
        void initStartFreqComboBox(int type);
        void initEndFreqComboBox(int type);

    protected:
        /**
         * @brief ui object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Ui::GUIGlobalFrequencyDomainDialog* _ui = nullptr;
        /**
         * @brief 操作器对象
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Core::FITKActionOperator* _oper = nullptr;
        /**
         * @brief  全局频谱范围
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-08
         */
        Acoustics::FITKGlobalFrequencyDomain* _globalFrequencyDomain = nullptr;
    };
}


#endif // _GUIGlobalFrequencyDomainDialog_H
